<template>
	<div>
		<el-form :model="form.addFormInfo">
			
			<el-form-item label="名称" :label-width="formLabelWidth" >
		      <el-input v-model="form.addFormInfo.name"></el-input>
		    </el-form-item>

		    <el-form-item label="备注" :label-width="formLabelWidth">
		      <el-input v-model="form.addFormInfo.mark"></el-input>
		    </el-form-item>

	    </el-form>

	    <div class="dialog-footer">
			<span slot="footer">
			    <el-button @click="closeDialog">取 消</el-button>
			    <el-button type="primary" @click="dialogOkBtn">确 定</el-button>
			</span>
		</div>
	</div>
</template>

<script>
import _http from '../common/http.vue'
	
export default{
	data(){
		return{
			form:{
				addFormInfo:{
					name:'',
					mark:''
				}
			},
			formLabelWidth:'120px'
		}
	},
	methods:{
		closeDialog(){
			this.$emit('closeDialog')
		},
		dialogOkBtn(){
			_http.axiosRequest(this,'configAddFormTpl',{form:this.form.addFormInfo},(res)=>{
    			if (_http.apiResult(this,res.data)) {
    				this.closeDialog()
    				this.$emit('freshList')
    			}
    		})
		}
	}

}	
</script>
<style>
	.dialog-footer{
		text-align: right;
	}
</style>

